Skip to content

fix(responses): normalize empty function tool parameters to valid JSON Schema#6021

Open
derekhiggins wants to merge 2 commits into
ogx-ai:mainfrom
derekhiggins:fix/empty-tool-params
Open

fix(responses): normalize empty function tool parameters to valid JSON Schema#6021
derekhiggins wants to merge 2 commits into
ogx-ai:mainfrom
derekhiggins:fix/empty-tool-params

Conversation

@derekhiggins

@derekhiggins derekhiggins commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

Fixes #6017

Summary

  • Normalize empty or incomplete function tool parameters to {"type": "object"} before forwarding to inference providers
  • Prevents 500 errors when Anthropic's API rejects missing parameters.type

Test plan

  • Unit test added for empty parameters normalization
  • Integration test with Anthropic provider

Open in Devin Review

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 2 additional findings.

Open in Devin Review

@github-actions

github-actions Bot commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

Recordings committed successfully

Recordings from the integration tests have been committed to this PR.

View commit workflow

derekhiggins and others added 2 commits June 12, 2026 15:58
Co-Authored-By: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
@derekhiggins derekhiggins force-pushed the fix/empty-tool-params branch from 0034701 to bcf85ab Compare June 12, 2026 14:58

@mattf mattf left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please coordinate via #6017

@mattf mattf left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is a fix to anthropic behavior, it needs to be in the anthropic adapter

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Empty function tool parameters cause 500 error with Anthropic provider

2 participants